<!--  -->
<template>
  <div id="app">
    <van-nav-bar
      left-arrow="true"
      class="nav-class"
      @click-left="onClickLeft"
      title="奥林匹克花园"
    />

    <van-swipe class="my-swipe" :autoplay="3000">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img v-lazy="image" />
      </van-swipe-item>
    </van-swipe>
    <div class="desc">中间层三居室，户型方正，采光好，明 厨明卫，南北通透</div>
    <div class="nav">
      <ul>
        <li>
          <span> 售价 </span>
          <span class="navRedSpan"> 750万 </span>
        </li>
        <li>
          <span> 房型 </span>
          <span class="navRedSpan"> 3室2厅 </span>
        </li>
        <li>
          <span> 建筑面积 </span>
          <span class="navRedSpan"> 128m2 </span>
        </li>
      </ul>
    </div>
    <div class="label-buttons">
      <div class="label-button lable-button-green-color">地铁</div>
      <div class="label-button lable-button-orange-color">满五年</div>
      <div class="label-button lable-button-cyan-color">随时看房</div>
    </div>

    <div class="descrebes">
      <div class="describe-detail">
        <span class="keyname">单价：</span>
        <span class="keyvalue">72125元/平 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">朝向：</span>
        <span class="keyvalue"> 南北通透 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">类型：</span>
        <span class="keyvalue">塔楼 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">装修：</span>
        <span class="keyvalue"> 豪装 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">挂牌：</span>
        <span class="keyvalue"> 2017.9.18 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">楼层：</span>
        <span class="keyvalue"> 中楼层/26 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">电梯：</span>
        <span class="keyvalue"> 有电梯 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">年代：</span>
        <span class="keyvalue"> 2017年 </span>
      </div>
      <div class="describe-detail">
        <span class="keyname">权属：</span>
        <span class="keyvalue"> 商品房 </span>
      </div>
      <div class="describe-detail-last" @click="districtClick">
        <span class="keyname">小区：</span>
        <span class="keyvalue-last"> 奥林匹克花园 </span>
      </div>
    </div>
    <div
      style="
        display: flex;
        flex-direction: row;
        justify-content: center;
        margin: 60 40;
      "
    >
      <button class="button-more" @click="moreInfo">更多房源信息</button>
    </div>
    <div class="banner">
      <img src="../assets/map.png" />
    </div>
    <div class="container">
      <div class="transform-label">
        <span class="left-span">双井</span>
        <span class="middle-span">10号线</span>
        <span class="right-span">671米</span>
      </div>
      <div class="transform-label">
        <span class="left-span">双井</span>
        <span class="middle-span">10号线</span>
        <span class="right-span">671米</span>
      </div>
      <div class="small-back-container" @click="houseSubmit">
        <span class="intro-title">房源介绍</span>
        <van-icon name="arrow" class="back-button" />
      </div>
      <span class="span-content"
        >核心卖点房子为南北通透，带电梯的三居室，房子装修为业主的婚房装修描述房子之前为业主的婚房，目前出租中，租户对房子保持得很好…</span
      >
      <div class="seporator-line"></div>
      <div class="small-back-container" @click="record">
        <span class="intro-title">看房记录</span>
        <van-icon name="arrow" class="back-button" />
      </div>
      <div class="small-back-container" @click="record">
        <div>
          <img src="../assets/women.png" class="avart" />
          <div style="display: inline-block">
            <div class="up-sub-grand-container">
              <span class="intro-title thirty-font">刘胡兰</span>
              <div class="label-button lable-button-gray-color">
                <van-icon
                  name="star-o"
                  color="red"
                  class="back-button twenty-size"
                />
                <span class="judge-value-label">4.7分</span>
              </div>
              <div class="label-button lable-button-gray-color">
                金色-云台店
              </div>
            </div>
            <div>
              <span class="middle-span"
                >共带看本房22次，最新带看：2018.05.29</span
              >
            </div>
          </div>
        </div>
        <van-icon name="phone" color="red" class="back-button" @click="agent" />
      </div>
      <div class="seporator-line"></div>
      <div class="small-back-container">
        <span class="intro-title">奥林匹克花园</span>
        <div class="small-back-container" @click="unitproperty">
          <span class="judge-value-label">小区详情</span>
          <van-icon name="arrow" class="back-button twenty-size" />
        </div>
      </div>
      <div class="small-back-container">
        <div class="half-width-container">
          <div class="transform-label-start">
            <span class="left-span">双井</span>
            <span class="middle-span">671米</span>
          </div>
          <div class="transform-label-start">
            <span class="left-span">双井</span>
            <span class="middle-span">671米</span>
          </div>
          <div class="transform-label-start">
            <span class="left-span">双井</span>
            <span class="middle-span">671米</span>
          </div>
          <div class="transform-label-start">
            <span class="left-span">双井</span>
            <span class="middle-span">671米</span>
          </div>
        </div>
        <div>
          <img src="../assets/scene.png" class="right-image" />
        </div>
      </div>
      <div class="seporator-line"></div>
      <div class="small-back-container">
        <span class="intro-title">同小区房源</span>
        <div class="small-back-container">
          <span class="judge-value-label">更多房源</span>
          <van-icon name="arrow" class="back-button twenty-size" />
        </div>
      </div>
      <div class="collect-view">
        <div class="collect-cell">
          <img src="../assets/scene.png" class="cell-image" />
          <span class="main-color">4室2厅/243㎡/南北通透</span>
          <div class="transform-label-start">
            <span class="judge-value-label">1100万元</span>
            <span class="middle-span">11546元/平</span>
          </div>
        </div>
        <div class="collect-cell">
          <img src="../assets/scene.png" class="cell-image" />
          <span class="main-color">4室2厅/243㎡/南北通透</span>
          <div class="transform-label-start">
            <span class="judge-value-label">1100万元</span>
            <span class="middle-span">11546元/平</span>
          </div>
        </div>
        <div class="collect-cell">
          <img src="../assets/scene.png" class="cell-image" />
          <span class="main-color">4室2厅/243㎡/南北通透</span>
          <div class="transform-label-start">
            <span class="judge-value-label">1100万元</span>
            <span class="middle-span">11546元/平</span>
          </div>
        </div>
        <div class="collect-cell">
          <img src="../assets/scene.png" class="cell-image" />
          <span class="main-color">4室2厅/243㎡/南北通透</span>
          <div class="transform-label-start">
            <span class="judge-value-label">1100万元</span>
            <span class="middle-span">11546元/平</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      images: [
        "https://img01.yzcdn.cn/vant/apple-1.jpg",
        "https://img01.yzcdn.cn/vant/apple-2.jpg",
        "https://img01.yzcdn.cn/vant/apple-4.jpg",
        "https://img01.yzcdn.cn/vant/apple-4.jpg",
      ],
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    onClickLeft() {
      this.$router.back();
    },
    moreInfo() {
      this.$router.push("/unitdetail");
    },
    districtClick() {
      this.$router.push("/unitsubmit");
    },
    houseSubmit() {
      this.$router.push("/housesubmit");
    },
    unitproperty() {
      this.$router.push("/unitproperty");
    },
    record() {
      this.$router.push("/agentrecord");
    },
    agent() {
      this.$router.push("/agent");
    }
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style scoped>
/* @import url(); 引入公共css类 */
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  height: 200px;
  text-align: center;
}
.my-swipe .van-swipe-item img {
  width: 100%;
  height: 100%;
}

.seporator-line {
  background-color: #e1e1e1;
  height: 1px;
  margin-top: 30px;
}
.nav {
  width: 100%;
}
.nav > ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.nav li {
  list-style-type: none;
  text-align: center;
}

.nav span {
  font-weight: 400;
  color: #666666;
  font-size: 12px;
  display: block;
}
.nav span.navRedSpan {
  font-weight: bold;
  color: #e75c61;
  font-size: 15px;
  padding-top: 10px;
}
.banner {
  width: 100%;
  height: auto;
}
.banner img {
  width: 100%;
}
.desc {
  padding: 15px;
  font-size: 19px;
  color: #333;
  font-weight: bold;
}
.label-buttons {
  /* display: flex; */
  padding: 15px 20px;
}
.label-button {
  padding: 3px 6px;
  margin-right: 5px;
  font-size: 11px;
  border-radius: 2px;
  display: inline-block;
  text-align: center;
}
.lable-button-green-color {
  color: #00c482;
  background-color: rgba(0, 196, 130, 0.2);
}
.lable-button-orange-color {
  color: #ff8957;
  background-color: rgba(255, 137, 87, 0.2);
}
.lable-button-cyan-color {
  color: #56c1ff;
  background-color: rgba(86, 193, 255, 0.2);
}
.lable-button-gray-color {
  color: #666666;
  background-color: #eeeeee;
}
.descrebes {
  padding: 15px;
}
.keyname {
  font-size: 14px;
  color: #999999;
}
.keyvalue {
  font-size: 14px;
  color: #333333;
}
.describe-detail {
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  /*文本不会换行*/
  white-space: nowrap;
  /*当文本溢出包含元素时，以省略号表示超出的文本*/
  text-overflow: ellipsis;

  display: inline-block;
  width: 49%;
}
.keyvalue-last {
  font-size: 14px;
  color: cyan;
}
.describe-detail-last {
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  /*文本不会换行*/
  white-space: nowrap;
  /*当文本溢出包含元素时，以省略号表示超出的文本*/
  text-overflow: ellipsis;

  display: inline-block;
  width: 100%;
}

.button-more {
  margin: 20px 30px;
  height: 44px;
  width: 100%;
  background-color: #f1f1f1;
  border-radius: 22px;
  color: #e75c61;
  font-size: 15px;
  font-weight: regular;
  text-align: center;
  border: none;
}
.container {
  margin: 7px 20px;
}
.half-width-container {
  width: 60%;
}
.small-back-container {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.transform-label {
  margin-bottom: 17px;
}
.transform-label-start {
  margin-bottom: 5px;
}

.left-span {
  color: #333333;
  font-size: 13px;
  margin-right: 15px;
}
.middle-span {
  color: #999999;
  font-size: 12px;
  width: auto;
}
.right-span {
  float: right;
  color: #333333;
  font-size: 13px;
  text-align: right;
}
.intro-title {
  color: #333333;
  font-size: 19px;
}
.back-button {
  float: right;
  width: 13px;
  height: 13px;
}
.span-content {
  color: #999999;
  font-size: 14px;
}
.main-color {
  color: #333333;
  font-size: 14px;
}
.thirty-font {
  font-size: 15px;
}
.twenty-size {
  float: left;
  height: 10px;
  width: 10px;
}
.judge-value-label {
  color: #e75c61;
  font-size: 11px;
}
.avart {
  width: 40px;
  height: 40px;
  padding-right: 10px;
}
.up-sub-grand-container {
  display: flex;
  justify-content: flex-start;
}
.right-image {
  width: 120px;
  height: 90px;
}

.collect-cell {
  display: flex;
  flex-direction: column;
  width: 45%;
  margin-bottom: 15px;
}
.cell-image {
  width: 100%;
  height: 135px;
}
.collect-view {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  /* align-content: space-between; */
  /* margin-top: 15px;
  padding: 10px 30px; */
}
van-icon {
  color: #333333 !important;
  background: red;
}
.nav-class {
  color: #333333 !important;
}
</style>
